import request from '@/utils/request'

export function showAdminUserList(query) {
  return request({
    url: '/auth/admin/show',
    method: 'get',
    params: query
  })
}

export function deleteAdminUser(adminId) {
  return request({
    url: '/auth/admin/remove',
    method: 'get',
    params: { 'adminId': adminId }
  })
}

export function addAdminUser(data) {
  return request({
    url: '/auth/admin/add',
    method: 'post',
    data
  })
}

export function editAdminUser(data) {
  return request({
    url: '/auth/admin/edit',
    method: 'post',
    data
  })
}

export function changePwd(data) {
  return request({
    url: '/auth/admin/pwd',
    method: 'post',
    data
  })
}

export function changePwdSelf(data) {
  return request({
    url: '/auth/admin/pwd/self',
    method: 'post',
    data
  })
}

export function getRoleList() {
  return request({
    url: '/auth/admin/role/list',
    method: 'get'
  })
}

